/* This is the main GUI used to run the game
 * 
 */

package gui;

import game.*;
import gui.battle.*;

import item.ship.*;
import java.util.ArrayList;

import javax.swing.*;


public class GameGUI {

	
	private int width; //the width of the game window
	private int height; //the height of the game window
	private JFrame frame; //the main frame for the GUI
	public static BattlePanel battle; //the panel that is used for the battling
	private JPanel mainPanel; //the main menu
	Game game;
	
	
	//0 param constructor that creates the GUI
	public GameGUI(){
		
		width = 1280;
		height = 720;
	
		ArrayList<Ship> l = new ArrayList<Ship>();
		ArrayList<Ship> r = new ArrayList<Ship>();
		
		l.add(RandomFlagship.random(1));
		l.add(RandomFlagship.random(1));
		l.add(RandomFlagship.random(1));
		l.add(RandomFlagship.random(1));
		r.add(RandomFlagship.random(1));
		r.add(RandomFlagship.random(1));
		r.add(RandomFlagship.random(1));
		r.add(RandomFlagship.random(1));
		
		battle = new BattlePanel(l, r);
		
		game = new Game();
		frame= new JFrame("Space Game");
		frame.setSize(width,height);
		frame.setResizable(false);
		mainPanel = battle;

		frame.add(mainPanel);
		
		
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		
		
		
		
		frame.setVisible(true);
	}//default constructor
	
	
	
	//runs the gui
	public static void main(String[] args){
		
		GameGUI g = new GameGUI();
	}//main
}//GUI
